import { defHttp } from '/@/utils/http/axios';
import { ContentTypeEnum } from '/@/enums/httpEnum';
import setting from '/@/settings/projectSetting';
const Api = {
  visualList: `${setting.interfacePrefix}/visual/list`, //智能模块列表
  visualListPage: `${setting.interfacePrefix}/visual/listPage`, //智能模块配置项
  visualAddPage: `${setting.interfacePrefix}/visual/addPage`, //智能模块新增初始化
  visualCreate: `${setting.interfacePrefix}/visual/create`, //智能模块新增保存
  visualEditPage: `${setting.interfacePrefix}/visual/editPage`, //智能模块编辑初始化
  getViewJsScript: `${setting.interfacePrefix}/visual/getViewJsScript`, //取显示规则脚本
  visualUpdate: `${setting.interfacePrefix}/visual/update`, //智能模块编辑保存
  visualShowPage: `${setting.interfacePrefix}/visual/showPage`, //智能模块查看
  visualDel: `${setting.interfacePrefix}/visual/del`, //智能模块查看
  visualBatchOp: `${setting.interfacePrefix}/visual/batchOp`, //智能模块自定义批处理
  visualModuleEditInPlace: `${setting.interfacePrefix}/visual/editInPlace`, //智能模块单元格编辑

  visualListRelatePage: `${setting.interfacePrefix}/visual/listRelatePage`, //智能模块关联模块初始化配置
  visualListRelate: `${setting.interfacePrefix}/visual/listRelate`, //智能模块关联模块列表
  visualAddRelatePage: `${setting.interfacePrefix}/visual/addRelatePage`, //智能模块关联模块新增配置
  visualCreateRelate: `${setting.interfacePrefix}/visual/createRelate`, //智能模块关联模块新增保存
  visualEditRelatePage: `${setting.interfacePrefix}/visual/editRelatePage`, //智能模块关联模块列表编辑配置
  visualUpdateRelate: `${setting.interfacePrefix}/visual/updateRelate`, //智能模块关联模块列表编辑保存
  visualShowRelatePage: `${setting.interfacePrefix}/visual/showRelatePage`, //智能模块关联模块列表查看
  visualDelRelate: `${setting.interfacePrefix}/visual/delRelate`, //智能模块关联模块列表删除
  copy: `${setting.interfacePrefix}/visual/copy`, //智能模块复制
  visualListSelPage: `${setting.interfacePrefix}/visual/listSelPage`, //表单域选择模块列表配置
  visualListNestSelPage: `${setting.interfacePrefix}/visual/listNestSel`, //嵌套表格选择模块列表配置

  visualExportExcel: `${setting.interfacePrefix}/visual/exportExcel`, //智能模块导出Excel

  visualExportExcelAsync: `${setting.interfacePrefix}/visual/exportExcelAsync`, //异步导出Excel

  getExportExcelProgress: `${setting.interfacePrefix}/visual/getExportExcelProgress`, //异步导出Excel的进度
  downloadExportExcelAsync: `${setting.interfacePrefix}/visual/downloadExportExcelAsync`, //下载异步导出的Excel文件

  visualImportExcel: `${setting.interfacePrefix}/visual/importExcel`, //智能模块导入
  visualExportWord: `${setting.interfacePrefix}/visual/exportWord`, //智能模块导出word
  exportWordRelated: `${setting.interfacePrefix}/visual/exportWordRelated`, //智能模块导出word

  visualDownloadZip: `${setting.interfacePrefix}/visual/downloadZipFile`, //智能模块压缩下载
  visualExportExcelRelate: `${setting.interfacePrefix}/visual/exportExcelRelate`, //智能模块关联模块导出

  visualImportExcelNest: `${setting.interfacePrefix}/visual/importExcelNest`, //嵌套表格导入

  visualDownloadExcelTemplForNest: `${setting.interfacePrefix}/visual/downloadExcelTemplForNest`, //下载嵌套表格Excel模板

  visualDownloadExcelTempl: `${setting.interfacePrefix}/visual/downloadExcelTempl`, //下载Excel模板

  itemsForListModuleSel: `${setting.interfacePrefix}/visual/getItemsForListModuleSel`, //当表单域选择宏控件选择后获取其值

  selBatchForNest: `${setting.interfacePrefix}/visual/selBatchForNest`, //嵌套表格宏控件拉单

  visualListAtt: `${setting.interfacePrefix}/visual/listAtt`, //附件列表
  visualDelAttach: `${setting.interfacePrefix}/visual/delAttach`, //附件列表删除
  visualDownload: `${setting.interfacePrefix}/visual/download`, //附件列表下载

  visualListCalendar: `${setting.interfacePrefix}/visual/listCalendar`, //智能模块日历

  getModuleTree: `${setting.interfacePrefix}/visual/getModuleTree`, //智能模块树

  getModuleTreeNodePriv: `${setting.interfacePrefix}/visual/tree/priv/getModuleTreeNodePriv`, //用户在智能模块树节点上的权限
  getIdByNode: `${setting.interfacePrefix}/visual/getIdByNode`, //取智能模块树节点（单记录）对应的ID
  getPrivList: `${setting.interfacePrefix}/visual/tree/priv/list`, //基础数据树形的权限控制器列表
  getPrivListCreate: `${setting.interfacePrefix}/visual/tree/priv/create`, //基础数据树形的权限控制器列表创建
  getPrivListUpdate: `${setting.interfacePrefix}/visual/tree/priv/update`, //基础数据树形的权限控制器列表修改
  getPrivListDel: `${setting.interfacePrefix}/visual/tree/priv/del`, //基础数据树形的权限控制器列表
  isManagerOfNode: `${setting.interfacePrefix}/visual/tree/priv/isManagerOfNode`, //基础数据树形节点上是否有管理权限
  getFieldsWithNest: `${setting.interfacePrefix}/visual/getFieldsWithNest`, //取模块表单及其嵌套表的字段
  getFieldsWithNestForExport: `${setting.interfacePrefix}/visual/getFieldsWithNestForExport`, //取选择列导出时模块表单及其嵌套表的字段

  getExportFields: `${setting.interfacePrefix}/visual/getExportFields`, //取模块中的导出字段配置
  getFrontColProps: `${setting.interfacePrefix}/visual/getFrontColProps`, //取模块中前端定义的列属性

  getBackColProps: `${setting.interfacePrefix}/visual/getBackColProps`, //取模块中后端定义的列属性
  updateFrontColProps: `${setting.interfacePrefix}/visual/updateFrontColProps`, //保存模块前台定义的列属性

  attendanceListShift: `${setting.interfacePrefix}/attendance/listShift`, //班次列表
  attendanceListForAdjust: `${setting.interfacePrefix}/attendance/listForAdjust`, //班次调整列表
  attendanceSaveShiftAdjust: `${setting.interfacePrefix}/attendance/saveShiftAdjust`, //班次调整列表保存

  visualListModuleByFormCode: `${setting.interfacePrefix}/visual/listModuleByFormCode`, //表单模块列表
  visualCreateSubModule: `${setting.interfacePrefix}/visual/createSubModule`, //表单模块新增
  visualCloneModule: `${setting.interfacePrefix}/visual/cloneModule`, //表单模块复制
  visualSyncModule: `${setting.interfacePrefix}/visual/syncModule`, //表单模块同步
  visualDelModule: `${setting.interfacePrefix}/visual/delModule`, //表单模块删除
  visualListModuleForMgr: `${setting.interfacePrefix}/visual/listModuleForMgr`, //列出模块
  visualGetModuleProps: `${setting.interfacePrefix}/visual/getModuleProps`, //取得模块配置信息
  visualSetModuleProps: `${setting.interfacePrefix}/visual/setModuleProps`, //保存模块配置信息
  visualClearExportColProps: `${setting.interfacePrefix}/visual/clearExportColProps`, //清空字段
  visualColAdd: `${setting.interfacePrefix}/visual/colAdd`, //预览列表列新增
  visualColModify: `${setting.interfacePrefix}/visual/colModify`, //预览列表列新增
  visualColDel: `${setting.interfacePrefix}/visual/colDel`, //预览列表列删除
  visualGetFormFieldsWithModuleRelated: `${setting.interfacePrefix}/visual/getFormFieldsWithModuleRelated`, //预览列表选择字段
  visualSetMsgProp: `${setting.interfacePrefix}/visual/setMsgProp`, //事件提醒保存

  visualListTag: `${setting.interfacePrefix}/visual/listTag`, //导航页签列表
  visualAddTag: `${setting.interfacePrefix}/visual/addTag`, //添加导航页签
  visualModifyTag: `${setting.interfacePrefix}/visual/modifyTag`, //修改导航页签
  visualDelTag: `${setting.interfacePrefix}/visual/delTag`, //删除导航页签
  visualListColOperateCustomBtns: `${setting.interfacePrefix}/visual/listColOperateCustomBtns`, //列出操作列按钮list
  visualLinkAdd: `${setting.interfacePrefix}/visual/linkAdd`, //添加操作列按钮
  visualLinkDel: `${setting.interfacePrefix}/visual/linkDel`, //删除操作列按钮
  visualLinkModify: `${setting.interfacePrefix}/visual/linkModify`, //修改操作列按钮
  visualGetPropStat: `${setting.interfacePrefix}/visual/getPropStat`, //获取合计字段
  visualUpdatePropStat: `${setting.interfacePrefix}/visual/updatePropStat`, //获取合计字段保存

  visualGetModuleFilter: `${setting.interfacePrefix}/visual/getModuleFilter`, //获取过滤
  visualSetModuleFilter: `${setting.interfacePrefix}/visual/setModuleFilter`, //过滤保存
  visualGetPromptIcon: `${setting.interfacePrefix}/visual/getPromptIcon`, //获取行首图标
  visualSetPromptIcon: `${setting.interfacePrefix}/visual/setPromptIcon`, //行首图标保存

  visualListToolbarCustomBtns: `${setting.interfacePrefix}/visual/listToolbarCustomBtns`, //列出工具条按钮
  visualBtnAdd: `${setting.interfacePrefix}/visual/btnAdd`, //添加工具条按钮
  visualBtnModify: `${setting.interfacePrefix}/visual/btnModify`, //修改工具条按钮
  visualBtnDel: `${setting.interfacePrefix}/visual/btnDel`, //删除工具条按钮

  visualGetEditPageSetup: `${setting.interfacePrefix}/visual/getEditPageSetup`, //取编辑页设置
  visualUpdateEditPageSetup: `${setting.interfacePrefix}/visual/updateEditPageSetup`, //保存编辑页设置
  visualGetShowPageSetup: `${setting.interfacePrefix}/visual/getShowPageSetup`, //取详情页设置
  visualUpdateShowPageSetup: `${setting.interfacePrefix}/visual/updateShowPageSetup`, //保存详情页设置

  visualGetListPageSetup: `${setting.interfacePrefix}/visual/getListPageSetup`, //取得平铺列表页中的设置
  visualUpdatePageList: `${setting.interfacePrefix}/visual/updatePageList`, //保存列表页的设置
  visualGetMobileListPageSetup: `${setting.interfacePrefix}/visual/getMobileListPageSetup`, //取得手机端列表页中的设置
  visualUpdatePageMobileList: `${setting.interfacePrefix}/visual/updatePageMobileList`, //保存手机端列表页的设置
  visualGetModuleCss: `${setting.interfacePrefix}/visual/getModuleCss`, //取得模块样式
  visualUpdateModuleCss: `${setting.interfacePrefix}/visual/updateModuleCss`, //更新模块样式
  visualCondPage: `${setting.interfacePrefix}/visual/condPage`, //条件设置页面模块条件获取
  visualCondUpdate: `${setting.interfacePrefix}/visual/condUpdate`, //模块条件修改
  visualCondCreate: `${setting.interfacePrefix}/visual/condCreate`, //模块条件新增
  visualCondDel: `${setting.interfacePrefix}/visual/condDel`, //模块条件删除
  visualListPriv: `${setting.interfacePrefix}/visual/listPriv`, //权限列表
  visualCreatePriv: `${setting.interfacePrefix}/visual/createPriv`, //权限创建
  visualDelPriv: `${setting.interfacePrefix}/visual/delPriv`, //权限删除
  visualUpdatePriv: `${setting.interfacePrefix}/visual/updatePriv`, //权限删除
  visualSetFieldWrite: `${setting.interfacePrefix}/visual/setFieldWrite`, //设置可写
  visualSetFieldHide: `${setting.interfacePrefix}/visual/setFieldHide`, //设置隐藏
  visualSetFieldExport: `${setting.interfacePrefix}/visual/setFieldExport`, //设置可导
  visualSetModulePrivFilter: `${setting.interfacePrefix}/visual/setModulePrivFilter`, //设置配置
  visualListSubTab: `${setting.interfacePrefix}/visual/listSubTab`, //列出模块选项卡
  visualDelSubTab: `${setting.interfacePrefix}/visual/delSubTab`, //删除模块选项卡
  visualListImport: `${setting.interfacePrefix}/visual/listImport`, //导入list
  setDefaultImportTempalte: `${setting.interfacePrefix}/visual/setDefaultImportTempalte`, //置默认导入模板
  delImport: `${setting.interfacePrefix}/visual/delImport`, //删除导入模板

  // visualUploadExcel: `${setting.interfacePrefix}/visual/uploadExcel`, //上传excel
  visualUploadTemplate: `${setting.interfacePrefix}/visual/uploadTemplate`, //上传excel
  visualEditImportPage: `${setting.interfacePrefix}/visual/editImportPage`, //获取导入
  visualCreateImportCells: `${setting.interfacePrefix}/visual/createImportCells`, //创建非批量导入模板
  visualUpdateImportCells: `${setting.interfacePrefix}/visual/updateImportCells`, //保存非批量导入模板
  visualCreateImportCols: `${setting.interfacePrefix}/visual/createImportCols`, //创建批量导入模板
  visualUpdateImportCols: `${setting.interfacePrefix}/visual/updateImportCols`, //保存批量导入模板

  visualCreateSubTag: `${setting.interfacePrefix}/visual/createSubTag`, //创建选项卡
  visualUpdateSubTag: `${setting.interfacePrefix}/visual/updateSubTag`, //修改选项卡
  visualListExportTemplate: `${setting.interfacePrefix}/visual/listExportTemplate`, //列出导出模板
  visualEditExportTemplatePage: `${setting.interfacePrefix}/visual/editExportTemplatePage`, //编辑导出模板页
  visualDelExport: `${setting.interfacePrefix}/visual/delExport`, //删除导出模板页
  visualUpdateExportTemplate: `${setting.interfacePrefix}/visual/updateExportTemplate`, //保存导出模板页
  visualCreateExportTemplate: `${setting.interfacePrefix}/visual/createExportTemplate`, //创建导出模板页
  visualSetDefaultExportTempalte: `${setting.interfacePrefix}/visual/setDefaultExportTempalte`, //设置默认导出模板
  visualAddExportTemplatePage: `${setting.interfacePrefix}/visual/addExportTemplatePage`, //设置默认导出模板
  visualListRelateModule: `${setting.interfacePrefix}/visual/listRelateModule`, //列出关联模块
  visualCreateRelateModule: `${setting.interfacePrefix}/visual/createRelateModule`, //添加关联模块
  visualUpdateRelateModule: `${setting.interfacePrefix}/visual/updateRelateModule`, //修改关联模块
  visualDelRelateModule: `${setting.interfacePrefix}/visual/delRelateModule`, //删除关联模块
  visualUpdateOrders: `${setting.interfacePrefix}/visual/updateOrders`, //删除关联模块

  adminHistoryList: `${setting.interfacePrefix}/admin/history/list`, //历史记录list
  adminHistoryDel: `${setting.interfacePrefix}/admin/history/del`, //历史记录删除
  adminHistoryRestore: `${setting.interfacePrefix}/admin/history/restore`, //历史记录删除

  visualGetRowProps: `${setting.interfacePrefix}/visual/getRowProps`, //取得行配置信息
  visualUpdateRowProps: `${setting.interfacePrefix}/visual/updateRowProps`, //更新模块行属性

  visualGetFieldProps: `${setting.interfacePrefix}/visual/getFieldProps`, //获取字段配置
  visualUpdateFieldProps: `${setting.interfacePrefix}/visual/updateFieldProps`, //更新字段配置
};

export const getItemsForListModuleSel = (params?: any) =>
  defHttp.post<any>(
    { url: Api.itemsForListModuleSel, params },
    {
      isTransformResponse: false,
    },
  );

export const getSelBatchForNest = (params?: any) =>
  defHttp.post<any>(
    { url: Api.selBatchForNest, params },
    {
      isTransformResponse: false,
    },
  );

export const getVisualList = (params?: any) => defHttp.post<any>({ url: Api.visualList, params });

export const getVisualListPage = (params?: any) =>
  defHttp.post<any>({ url: Api.visualListPage, params });

export const getVisualAddPage = (params?: any) =>
  defHttp.get<any>({ url: Api.visualAddPage, params });

export const getVisualCreate = (params?: any, query?: string) =>
  defHttp.post<any>({
    url: Api.visualCreate + query,
    params,
    headers: {
      'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryVD0qp8RY7NId5ucK',
    },
  });

export const getVisualEditPage = (params?: any) =>
  defHttp.get<any>({ url: Api.visualEditPage, params });
export const getViewJsScript = (params?: any) =>
  defHttp.get<any>({ url: Api.getViewJsScript, params });

export const getVisualUpdate = (params?: any, query?: string) =>
  defHttp.post<any>({
    url: Api.visualUpdate + query,
    params,
    headers: {
      'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryVD0qp8RY7NId5ucK',
    },
  });

export const getVisualShowPage = (params?: any) =>
  defHttp.get<any>({ url: Api.visualShowPage, params });

export const getVisualDel = (params?: any) => defHttp.post<any>({ url: Api.visualDel, params });
export const getVisualBatchOp = (params?: any) =>
  defHttp.post<any>({ url: Api.visualBatchOp, params });

export const getVisualModuleEditInPlace = (params?: any) =>
  defHttp.post<any>({ url: Api.visualModuleEditInPlace, params });

export const getVisualListRelatePage = (params?: any) =>
  defHttp.post<any>({ url: Api.visualListRelatePage, params });

export const getVisualListRelate = (params?: any) =>
  defHttp.post<any>({ url: Api.visualListRelate, params });

export const getVisualAddRelatePage = (params?: any) =>
  defHttp.post<any>({ url: Api.visualAddRelatePage, params });

export const getVisualCreateRelate = (params?: any, query?: string) =>
  defHttp.post<any>({
    url: Api.visualCreateRelate + query,
    params,
    headers: {
      'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryVD0qp8RY7NId5ucK',
    },
  });

export const getVisualEditRelatePage = (params?: any) =>
  defHttp.get<any>({ url: Api.visualEditRelatePage, params });

export const getVisualUpdateRelate = (params?: any, query?: string) =>
  defHttp.post<any>({
    url: Api.visualUpdateRelate + query,
    params,
    headers: {
      'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryVD0qp8RY7NId5ucK',
    },
  });

export const getVisualShowRelatePage = (params?: any) =>
  defHttp.get<any>({ url: Api.visualShowRelatePage, params });

export const getVisualDelRelate = (params?: any) =>
  defHttp.post<any>({ url: Api.visualDelRelate, params });

export const getVisualCopy = (params?: any) => defHttp.post<any>({ url: Api.copy, params });

export const getVisualListSelPage = (params?: any) =>
  defHttp.get<any>({ url: Api.visualListSelPage, params });

export const getVisualListNestSelPage = (params?: any) =>
  defHttp.get<any>({ url: Api.visualListNestSelPage, params });

export const getVisualExportWord = (params?: any) =>
  defHttp.get<any>(
    { url: Api.visualExportWord, params, responseType: 'blob' },
    {
      isTransformResponse: false,
    },
  );
export const getVisualExportWordRelated = (params?: any) =>
  defHttp.get<any>(
    { url: Api.exportWordRelated, params, responseType: 'blob' },
    {
      isTransformResponse: false,
    },
  );

export const getVisualDownloadZip = (params?: any) =>
  defHttp.get<any>(
    { url: Api.visualDownloadZip, params, responseType: 'blob' },
    {
      isTransformResponse: false,
    },
  );

export const getVisualExportExcel = (params?: any) =>
  defHttp.get<any>(
    { url: Api.visualExportExcel, params, responseType: 'blob' },
    {
      isTransformResponse: false,
    },
  );

export const downloadExportExcelAsync = (params?: any) =>
  defHttp.post<any>(
    { url: Api.downloadExportExcelAsync, params, responseType: 'blob' },
    {
      isTransformResponse: false,
    },
  );

export const getVisualExportExcelAsync = (params?: any) =>
  defHttp.post<any>({ url: Api.visualExportExcelAsync, params });

export const getExportExcelProgress = (params?: any) =>
  defHttp.post<any>({ url: Api.getExportExcelProgress, params });

export const getVisualImportExcel = (params?: any) =>
  defHttp.post<any>(
    {
      url: Api.visualImportExcel,
      params,
      headers: {
        'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryVD0qp8RY7NId5ucK',
      },
    },
    {
      isTransformResponse: false,
    },
  );

export const getVisualExportExcelRelate = (params?: any) =>
  defHttp.get<any>(
    { url: Api.visualExportExcelRelate, params, responseType: 'blob' },
    {
      isTransformResponse: false,
    },
  );

export const getVisualImportExcelNest = (params?: any, query?: string) =>
  defHttp.post<any>({
    url: Api.visualImportExcelNest + query,
    params,
    headers: {
      'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryVD0qp8RY7NId5ucK',
    },
  });

export const getVisualDownloadExcelTemplForNest = (params?: any) =>
  defHttp.get<any>(
    { url: Api.visualDownloadExcelTemplForNest, params, responseType: 'blob' },
    {
      isTransformResponse: false,
    },
  );

export const getVisualDownloadExcelTempl = (params?: any) =>
  defHttp.get<any>(
    { url: Api.visualDownloadExcelTempl, params, responseType: 'blob' },
    {
      isTransformResponse: false,
    },
  );

export const getVisualListAtt = (params?: any) =>
  defHttp.post<any>({ url: Api.visualListAtt, params });

export const getVisualDelAttach = (params?: any) =>
  defHttp.post<any>({ url: Api.visualDelAttach, params });

export const getVisualDownload = (params?: any) =>
  defHttp.post<any>(
    { url: Api.visualDownload, params, responseType: 'blob' },
    {
      isTransformResponse: false,
    },
  );

export const getvisualListCalendar = (params?: any) =>
  defHttp.post<any>({ url: Api.visualListCalendar, params });

export const getModuleTree = (params?: any) => defHttp.get<any>({ url: Api.getModuleTree, params });
export const getModuleTreeNodePriv = (params?: any) =>
  defHttp.post<any>({ url: Api.getModuleTreeNodePriv, params });
export const getIdByNode = (params?: any) => defHttp.post<any>({ url: Api.getIdByNode, params });

// 树形节点上的权限列表
export const getPrivList = (params?: any) => defHttp.post<any>({ url: Api.getPrivList, params });
export const getPrivListCreate = (params?: any) =>
  defHttp.post<any>({
    url: Api.getPrivListCreate,
    params,
    headers: { 'Content-Type': ContentTypeEnum.JSON },
  });
export const getPrivListUpdate = (params?: any) =>
  defHttp.post<any>({
    url: Api.getPrivListUpdate,
    params,
    headers: { 'Content-Type': ContentTypeEnum.JSON },
  });
export const getPrivListDel = (params?: any) =>
  defHttp.post<any>({
    url: Api.getPrivListDel,
    params,
  });

export const getIsManagerOfNode = (params?: any) =>
  defHttp.post<any>({
    url: Api.isManagerOfNode,
    params,
  });

export const getFieldsWithNest = (params?: any) =>
  defHttp.post<any>({ url: Api.getFieldsWithNest, params });
export const getFieldsWithNestForExport = (params?: any) =>
  defHttp.post<any>({ url: Api.getFieldsWithNestForExport, params });

export const getExportFields = (params?: any) =>
  defHttp.post<any>({ url: Api.getExportFields, params });

export const getFrontColProps = (params?: any) =>
  defHttp.post<any>({ url: Api.getFrontColProps, params });

export const getBackColProps = (params?: any) =>
  defHttp.post<any>({ url: Api.getBackColProps, params });

export const updateFrontColProps = (params?: any) =>
  defHttp.post<any>({ url: Api.updateFrontColProps, params });

export const getAttendanceListShift = (params?: any) =>
  defHttp.post<any>({ url: Api.attendanceListShift, params });
export const getAttendanceListForAdjust = (params?: any) =>
  defHttp.post<any>({ url: Api.attendanceListForAdjust, params });
export const getAttendanceSaveShiftAdjust = (params?: any) =>
  defHttp.post<any>({ url: Api.attendanceSaveShiftAdjust, params });

export const getVisualListModuleByFormCode = (params?: any) =>
  defHttp.post<any>({ url: Api.visualListModuleByFormCode, params });
export const getVisualCreateSubModule = (params?: any) =>
  defHttp.post<any>({ url: Api.visualCreateSubModule, params });
export const getVisualCloneModule = (params?: any) =>
  defHttp.post<any>({ url: Api.visualCloneModule, params });
export const getVisualSyncModule = (params?: any) =>
  defHttp.post<any>({ url: Api.visualSyncModule, params });
export const getVisualDelModule = (params?: any) =>
  defHttp.post<any>({ url: Api.visualDelModule, params });

export const getVisualGetModuleProps = (params?: any) =>
  defHttp.post<any>({ url: Api.visualGetModuleProps, params });
export const getVisualSetModuleProps = (params?: any) =>
  defHttp.post<any>({ url: Api.visualSetModuleProps, params });
export const getVisualClearExportColProps = (params?: any) =>
  defHttp.post<any>({ url: Api.visualClearExportColProps, params });
export const getVisualColAdd = (params?: any) =>
  defHttp.post<any>({ url: Api.visualColAdd, params });
export const getVisualColModify = (params?: any) =>
  defHttp.post<any>({ url: Api.visualColModify, params });
export const getVisualColDel = (params?: any) =>
  defHttp.post<any>({ url: Api.visualColDel, params });
export const getVisualGetFormFieldsWithModuleRelated = (params?: any) =>
  defHttp.post<any>({ url: Api.visualGetFormFieldsWithModuleRelated, params });
export const getVisualSetMsgProp = (params?: any) =>
  defHttp.post<any>({ url: Api.visualSetMsgProp, params });
export const getVisualGetPromptIcon = (params?: any) =>
  defHttp.post<any>({ url: Api.visualGetPromptIcon, params });
export const getVisualSetPromptIcon = (params?: any) =>
  defHttp.post<any>({ url: Api.visualSetPromptIcon, params });
export const getVisualGetModuleFilter = (params?: any) =>
  defHttp.post<any>({ url: Api.visualGetModuleFilter, params });
export const getVisualSetModuleFilter = (params?: any) =>
  defHttp.post<any>({ url: Api.visualSetModuleFilter, params });

export const getVisualListTag = (params?: any) =>
  defHttp.post<any>({ url: Api.visualListTag, params });
export const getVisualAddTag = (params?: any) =>
  defHttp.post<any>({ url: Api.visualAddTag, params });
export const getVisualModifyTag = (params?: any) =>
  defHttp.post<any>({ url: Api.visualModifyTag, params });
export const getVisualDelTag = (params?: any) =>
  defHttp.post<any>({ url: Api.visualDelTag, params });
export const getVisualLinkAdd = (params?: any) =>
  defHttp.post<any>({ url: Api.visualLinkAdd, params });
export const getVisualLinkDel = (params?: any) =>
  defHttp.post<any>({ url: Api.visualLinkDel, params });
export const getVisualLinkModify = (params?: any) =>
  defHttp.post<any>({ url: Api.visualLinkModify, params });
export const getVisualListColOperateCustomBtns = (params?: any) =>
  defHttp.post<any>({ url: Api.visualListColOperateCustomBtns, params });
export const getVisualGetPropStat = (params?: any) =>
  defHttp.post<any>({ url: Api.visualGetPropStat, params });
export const getVisualUpdatePropStat = (params?: any) =>
  defHttp.post<any>({ url: Api.visualUpdatePropStat, params });
export const getVisualListToolbarCustomBtns = (params?: any) =>
  defHttp.post<any>({ url: Api.visualListToolbarCustomBtns, params });
export const getVisualBtnAdd = (params?: any) =>
  defHttp.post<any>({ url: Api.visualBtnAdd, params });
export const getVisualBtnModify = (params?: any) =>
  defHttp.post<any>({ url: Api.visualBtnModify, params });
export const getVisualBtnDel = (params?: any) =>
  defHttp.post<any>({ url: Api.visualBtnDel, params });
export const getVisualGetEditPageSetup = (params?: any) =>
  defHttp.post<any>({ url: Api.visualGetEditPageSetup, params });
export const getVisualUpdateEditPageSetup = (params?: any) =>
  defHttp.post<any>({ url: Api.visualUpdateEditPageSetup, params });
export const getVisualGetShowPageSetup = (params?: any) =>
  defHttp.post<any>({ url: Api.visualGetShowPageSetup, params });
export const getVisualUpdateShowPageSetup = (params?: any) =>
  defHttp.post<any>({ url: Api.visualUpdateShowPageSetup, params });
export const getVisualGetListPageSetup = (params?: any) =>
  defHttp.post<any>({ url: Api.visualGetListPageSetup, params });
export const getVisualUpdatePageList = (params?: any) =>
  defHttp.post<any>({
    url: Api.visualUpdatePageList,
    params,
    headers: {
      'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryVD0qp8RY7NId5ucK',
    },
  });
export const getVisualGetMobileListPageSetup = (params?: any) =>
  defHttp.post<any>({ url: Api.visualGetMobileListPageSetup, params });
export const getVisualUpdatePageMobileList = (params?: any) =>
  defHttp.post<any>({
    url: Api.visualUpdatePageMobileList,
    params,
    headers: {
      'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryVD0qp8RY7NId5ucK',
    },
  });

export const getVisualGetModuleCss = (params?: any) =>
  defHttp.post<any>({ url: Api.visualGetModuleCss, params });
export const getVisualUpdateModuleCss = (params?: any) =>
  defHttp.post<any>({ url: Api.visualUpdateModuleCss, params });

export const getVisualCondPage = (params?: any) =>
  defHttp.post<any>({ url: Api.visualCondPage, params });
export const getVisualCondUpdate = (params?: any) =>
  defHttp.post<any>({
    url: Api.visualCondUpdate,
    params,
    headers: { 'Content-Type': ContentTypeEnum.JSON },
  });
export const getVisualCondCreate = (params?: any) =>
  defHttp.post<any>({
    url: Api.visualCondCreate,
    params,
    headers: { 'Content-Type': ContentTypeEnum.JSON },
  });
export const getVisualCondDel = (params?: any) =>
  defHttp.post<any>({ url: Api.visualCondDel, params });
export const getVisualListPriv = (params?: any) =>
  defHttp.post<any>({ url: Api.visualListPriv, params });
export const getVisualCreatePriv = (params?: any) =>
  defHttp.post<any>({
    url: Api.visualCreatePriv,
    params,
    headers: { 'Content-Type': ContentTypeEnum.JSON },
  });
export const getVisualDelPriv = (params?: any) =>
  defHttp.post<any>({ url: Api.visualDelPriv, params });
export const getVisualUpdatePriv = (params?: any) =>
  defHttp.post<any>({ url: Api.visualUpdatePriv, params });
export const getVisualSetFieldWrite = (params?: any) =>
  defHttp.post<any>({ url: Api.visualSetFieldWrite, params });
export const getVisualSetFieldHide = (params?: any) =>
  defHttp.post<any>({ url: Api.visualSetFieldHide, params });
export const getVisualSetFieldExport = (params?: any) =>
  defHttp.post<any>({ url: Api.visualSetFieldExport, params });
export const getVisualSetModulePrivFilter = (params?: any) =>
  defHttp.post<any>({ url: Api.visualSetModulePrivFilter, params });
export const getVisualListSubTab = (params?: any) =>
  defHttp.post<any>({ url: Api.visualListSubTab, params });
export const getVisualDelSubTab = (params?: any) =>
  defHttp.post<any>({ url: Api.visualDelSubTab, params });
export const getVisualListImport = (params?: any) =>
  defHttp.post<any>({ url: Api.visualListImport, params });
export const setDefaultImportTempalte = (params?: any) =>
  defHttp.post<any>({ url: Api.setDefaultImportTempalte, params });
export const delImport = (params?: any) => defHttp.post<any>({ url: Api.delImport, params });

// export const getVisualUploadExcel = (params?: any) =>
//   defHttp.post<any>({
//     url: Api.visualUploadExcel,
//     params,
//     headers: {
//       'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryVD0qp8RY7NId5ucK',
//     },
//   });
export const getVisualUploadTemplate = (params?: any) =>
  defHttp.post<any>({
    url: Api.visualUploadTemplate,
    params,
    headers: {
      'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryVD0qp8RY7NId5ucK',
    },
  });
export const getVisualEditImportPage = (params?: any) =>
  defHttp.post<any>({ url: Api.visualEditImportPage, params });
export const getVisualCreateImportCells = (params?: any) =>
  defHttp.post<any>({
    url: Api.visualCreateImportCells,
    params,
    headers: { 'Content-Type': ContentTypeEnum.JSON },
  });
export const getVisualUpdateImportCells = (params?: any) =>
  defHttp.post<any>({
    url: Api.visualUpdateImportCells,
    params,
    headers: { 'Content-Type': ContentTypeEnum.JSON },
  });
export const getVisualCreateImportCols = (params?: any) =>
  defHttp.post<any>({
    url: Api.visualCreateImportCols,
    params,
    headers: { 'Content-Type': ContentTypeEnum.JSON },
  });
export const getVisualUpdateImportCols = (params?: any) =>
  defHttp.post<any>({
    url: Api.visualUpdateImportCols,
    params,
    headers: { 'Content-Type': ContentTypeEnum.JSON },
  });
export const getVisualCreateSubTag = (params?: any) =>
  defHttp.post<any>({ url: Api.visualCreateSubTag, params });
export const getVisualUpdateSubTag = (params?: any) =>
  defHttp.post<any>({ url: Api.visualUpdateSubTag, params });

export const getVisualListExportTemplate = (params?: any) =>
  defHttp.post<any>({ url: Api.visualListExportTemplate, params });
export const getVisualEditExportTemplatePage = (params?: any) =>
  defHttp.post<any>({ url: Api.visualEditExportTemplatePage, params });
export const getVisualDelExport = (params?: any) =>
  defHttp.post<any>({ url: Api.visualDelExport, params });
export const getVisualUpdateExportTemplate = (params?: any) =>
  defHttp.post<any>({ url: Api.visualUpdateExportTemplate, params });
export const getVisualCreateExportTemplate = (params?: any) =>
  defHttp.post<any>({ url: Api.visualCreateExportTemplate, params });
export const getVisualSetDefaultExportTempalte = (params?: any) =>
  defHttp.post<any>({ url: Api.visualSetDefaultExportTempalte, params });
export const getVisualAddExportTemplatePage = (params?: any) =>
  defHttp.post<any>({ url: Api.visualAddExportTemplatePage, params });
export const getVisualListRelateModule = (params?: any) =>
  defHttp.post<any>({ url: Api.visualListRelateModule, params });
export const getVisualCreateRelateModule = (params?: any) =>
  defHttp.post<any>({ url: Api.visualCreateRelateModule, params });
export const getVisualUpdateRelateModule = (params?: any) =>
  defHttp.post<any>({ url: Api.visualUpdateRelateModule, params });
export const getVisualDelRelateModule = (params?: any) =>
  defHttp.post<any>({ url: Api.visualDelRelateModule, params });
export const getVisualUpdateOrders = (params?: any) =>
  defHttp.post<any>({ url: Api.visualUpdateOrders, params });

export const getAdminHistoryList = (params?: any) =>
  defHttp.post<any>({ url: Api.adminHistoryList, params });
export const getAdminHistoryDel = (params?: any) =>
  defHttp.post<any>({ url: Api.adminHistoryDel, params });
export const getAdminHistoryRestore = (params?: any) =>
  defHttp.post<any>({ url: Api.adminHistoryRestore, params });

export const getVisualListModuleForMgr = (params?: any) =>
  defHttp.post<any>({ url: Api.visualListModuleForMgr, params });

export const getVisualGetRowProps = (params?: any) =>
  defHttp.post<any>({ url: Api.visualGetRowProps, params });
export const getVisualUpdateRowProps = (params?: any) =>
  defHttp.post<any>({ url: Api.visualUpdateRowProps, params });

export const getVisualGetFieldProps = (params?: any) =>
  defHttp.post<any>({ url: Api.visualGetFieldProps, params });
export const getVisualUpdateFieldProps = (params?: any) =>
  defHttp.post<any>({ url: Api.visualUpdateFieldProps, params });
